#ifndef _HCC_ERROR_CODE_DRV_SOC_COMMON_H_
#define _HCC_ERROR_CODE_DRV_SOC_COMMON_H_

#include "ofc_types.h"
#include "hcc_error_code.h"
#include "hcc_error_code_drv.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_DRV_SOC_COMMON_ERROR(error_code) (int)HCC_MAKE_DRIVER_ERROR(kHccDrvSocCommon, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_DRIVER_ERROR(kHccDrvSocCommon, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 驱动层公共错误码:驱动层公共错误码
 */
enum THccDrvSocCommonTag
{
	kHccDrvSocCommonSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccDrvSocCommonParam	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(0),			///<参数错误
	kHccDrvSocCommonCallBack	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(1),			///<回调函数未设置
	kHccDrvSocCommonNoExist 	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(2),			///<设备不存在
	kHccDrvSocCommonNotSupport 	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(3),			///<类型不支持
	kHccDrvSocCommonOutOfRange	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(4),			///<超出范围
	kHccDrvSocCommonOpened	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(5),			///<设备已打开
	kHccDrvSocCommonClosed	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(6),			///<设备已关闭
	kHccDrvSocCommonBaudRate	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(7),			///<波特率不合法
	kHccDrvSocCommonFail	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(8),			///<操作失败
	kHccDrvSocCommonNotAligned	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(9),			///<边界未对齐
	kHccDrvSocCommonTimeout	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(10),			///<处理超时
	kHccDrvSocCommonNotReady	=	HCC_MAKE_DRV_SOC_COMMON_ERROR(11),			///<未准备好
};
typedef enum THccDrvSocCommonTag THccDrvSocCommon;


typedef Int32 THccDrvSocCommonLine;
#define kHccDrvSocCommonSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccDrvSocCommonParamLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(0)	///<参数错误
#define kHccDrvSocCommonCallBackLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(1)	///<回调函数未设置
#define kHccDrvSocCommonNoExistLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(2)	///<设备不存在
#define kHccDrvSocCommonNotSupportLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(3)	///<类型不支持
#define kHccDrvSocCommonOutOfRangeLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(4)	///<超出范围
#define kHccDrvSocCommonOpenedLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(5)	///<设备已打开
#define kHccDrvSocCommonClosedLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(6)	///<设备已关闭
#define kHccDrvSocCommonBaudRateLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(7)	///<波特率不合法
#define kHccDrvSocCommonFailLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(8)	///<操作失败
#define kHccDrvSocCommonNotAlignedLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(9)	///<边界未对齐
#define kHccDrvSocCommonTimeoutLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(10)	///<处理超时
#define kHccDrvSocCommonNotReadyLine	HCC_MAKE_DRV_SOC_COMMON_ERROR_LINE(11)	///<未准备好

//旧版本适配补丁
typedef THccDrvSocCommon TDrvErrorCode; 

#define kDrvErrorCodeSuccess kHccDrvSocCommonSuccess
#define kDrvErrorCodeParam kHccDrvSocCommonParam
#define kDrvErrorCodeCallBack kHccDrvSocCommonCallBack
#define kDrvErrorCodeNoExist kHccDrvSocCommonNoExist
#define kDrvErrorCodeNotSupport kHccDrvSocCommonNotSupport
#define kDrvErrorCodeOutOfRange kHccDrvSocCommonOutOfRange
#define kDrvErrorCodeOpened kHccDrvSocCommonOpened
#define kDrvErrorCodeClosed kHccDrvSocCommonClosed
#define kDrvErrorCodeBaudRate kHccDrvSocCommonBaudRate
#define kDrvErrorCodeFail kHccDrvSocCommonFail
#define kDrvErrorCodeNotAligned kHccDrvSocCommonNotAligned
#define kDrvErrorCodeTimeout kHccDrvSocCommonTimeout
#define kDrvErrorCodeNotReady kHccDrvSocCommonNotReady

#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_DRV_SOC_COMMON_H_
/**
 * @
 */
